'''
Created on Feb 9, 2012

@author: xzhu
'''
import const
class stateHead():
    '''
    classdocs
    '''

    n_res = 0
    resNames        = []
    poss_ioni       = []
    
    def __init__(self):
        '''
        Constructor
        '''
        pass
        
    def init_from_line(self, line):
        '''
        get the residue head from the first line of file
        '''
        
        fields = line.split()
        for field in fields[:-4]:
            stateHead.resNames.append(field)
            
        stateHead.n_res = len(self.resNames)
        for res in stateHead.resNames:
            stateHead.poss_ioni.append(const.POSS_IONI[res[:3]])
            